package com.hbnu.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hbnu.system.config.PostDeserializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2023-05-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("knowleage")
public class Knowleage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键 申报材料编号
     */
    @ApiModelProperty(value = "主键 申报材料编号")
    @TableId(value = "AppliMaterialsID", type = IdType.ASSIGN_ID)
    private String AppliMaterialsID;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    /**
     * 系统编号
     */
    @ApiModelProperty(value = "系统编号")
    @TableField("systemID")
    private String systemID;

    /**
     * 所属年度
     */
    @ApiModelProperty(value = "所属年度")
    @TableField("year")
    private String year;

    /**
     * 附件
     */
    @ApiModelProperty(value="附件")
    @JsonDeserialize(using = PostDeserializer.class)
    private byte[] annex;

    /**
     * 简介
     */
    @ApiModelProperty(value = "简介")
    @TableField("text")
    private String text;

    /**
     * 录入人
     */
    @ApiModelProperty(value = "录入人")
    @TableField("entered")
    private String entered;

    /**
     * 录入日期
     */
    @ApiModelProperty(value = "录入日期")
    @TableField("enteredDate") //fill = FieldFill.INSERT 自动填入
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate enteredDate;


}
